<!--
@description: API测试
@author: ldb
@time: 2022-11-26 10:18:45
-->
<template>{{ data }}</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { PostRequestApi, RequestApi } from '@/utils/api/RequestApi'
import { BaseModel } from '@/entity/base-model'
interface Area extends BaseModel {
  parentId: string
  cityCode: Array<string>
  adcode: string
  name: string
  polyline: string
  center: string
  level: string
}
const data = ref<Array<Area>>()
onMounted(async () => {
  const { data: data2, code } = await new PostRequestApi<Array<Area>>('/dict/page', {}, { cache: true }).get()
  data.value = data2
})
</script>

<style scoped lang="scss"></style>
